import request from '@/router/axios'

export function fetchPage (query) {
  return request({
    url: '/api/goods/specParams/page',
    method: 'get',
    params: query
  })
}

export function fetchList (query) {
  return request({
    url: '/api/goods/specParams',
    method: 'get',
    params: query
  })
}

export function getObj (id) {
  return request({
    url: '/api/goods/specParams/' + id,
    method: 'get'
  })
}

export function addObj (obj) {
  return request({
    url: '/api/goods/specParams',
    method: 'post',
    data: obj
  })
}

export function delObj (id) {
  return request({
    url: '/api/goods/specParams/' + id,
    method: 'delete'
  })
}

export function putObj (obj) {
  return request({
    url: '/api/goods/specParams',
    method: 'put',
    data: obj
  })
}

export function groupSpecList (categoryId) {
  return request({
    url: '/api/goods/specParams/groupSpecList/' + categoryId,
    method: 'get',
  })
}